# 定义空元组
# tuple1 = ()
# tuple2 = tuple()
# print(type(tuple1), tuple1)
# print(type(tuple2), tuple2)
#
# a = ("holle")
# b = tuple("world")
# print(type(a),a)
# print(type(b),b)


# todo 元组是不能被修改的
names = ("刘备","张三","关羽","赵云",[7,8,9])
# names[0] = "刘备之子"
# print(names)
names[-1][1] = "曹操"
print(names)

# 元组拆包
info = ("小乔",17,"女")
name,age,sex = info
print(name)
print(age)
print(sex)

# 字符串拆包
t1 = "123456"
a, b, c, d, e, f = t1
print(a, b, c, d, e, f)

# 列表拆包
list1 = ["张飞","关羽","刘备"]
z,x,c = list1
print(z,x,c)
